package com.xgk.boot.module.core.dal.entity.customer;

import com.baomidou.mybatisplus.annotation.*;
import com.xgk.boot.framework.mybatis.core.dataobject.BaseDO;
import com.xgk.boot.module.core.enums.biz.CurrencyEnum;
import lombok.Data;

import java.math.BigDecimal;

/**
 * 客户余额表-实体类
 */
@Data
@TableName("customer_balance")
public class CustomerBalanceDO extends BaseDO {

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 客户代码
     */
    @TableField(value = "customer_code")
    private String customerCode;

    /**
     * 客户ID
     */
    @TableField(value = "customer_id")
    private Long customerId;

    /**
     * 币种,默认为USD
     */
    @TableField(value = "currency_code")
    private String currencyCode= CurrencyEnum.USD.getValue();

    /**
     * 账户充值金额(当前总余额)
     */
    @TableField(value = "cb_value")
    private BigDecimal cbValue= BigDecimal.ZERO;

    /**
     * 冻结金额
     */
    @TableField(value = "cb_hold_value")
    private BigDecimal cbHoldValue=BigDecimal.ZERO;

    /**
     * 信用额度（当前已授权信用额度）
     */
    @TableField(value = "cb_credit_line")
    private BigDecimal cbCreditLine=BigDecimal.ZERO;

    /**
     * 授信余额（当前已授权授信额度）
     */
    @TableField("credit_amount")
    private BigDecimal creditBalance=BigDecimal.ZERO;


}